<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../style/common.css" />
<title>病院検索</title>
<script type="text/javascript">
	function onLoad() {
		var areaList = document.getElementById("areaselect");
		window.android.getAreaMA100051();
	}
	function setArea() {
		var areaList = document.getElementById("areaselect");
		var locationList = document.getElementById("locationselect");
		var jouhou = window.android.getAreaListMA100051();
		if (null == jouhou || jouhou.size() == 0) {
			areaList.disabled = true;
		} else {
			areaList.options.add(new Option("", ""));
			for ( var i = 0; i < jouhou.size(); i++) {
				areaList.options.add(new Option(jouhou.get(i), jouhou.get(i)));
			}
		}
		if (areaList.value == "") {
			locationList.disabled = true;
		} else {
			locationList.disabled = false;
		}
		window.android.cancelP();
	}

	function changed() {
		var areaList = document.getElementById("areaselect");
		var curstr = areaList.value;
		var locationList = document.getElementById("locationselect");
		window.android.getLocationMA100051(curstr);
		if (areaList.value == "") {
			locationList.disabled = true;
		} else {
			locationList.disabled = false;
		}
	}

	function setLocation() {
		var jouhou = window.android.getLocationListMA100051();
		var locationList = document.getElementById("locationselect");
		locationList.options.length = 0;
		locationList.options.add(new Option("", ""));
		for ( var i = 0; i < jouhou.size(); i++) {
			locationList.options.add(new Option(jouhou.get(i), jouhou.get(i)));
		}
		window.android.cancelP();
	}

	function sendPhaseNoToAzure(nextUrl, buttonIndex) {
		window.android.sendPhaseNoToAzure(nextUrl, buttonIndex);
	}

	function gotoNextPage(buttonIndex) {
		window.location.href = "MA-1000-5.html";
	}
	function selectbtn() {
		var areaList = document.getElementById("areaselect");
		var area = areaList.value;
		var locationList = document.getElementById("locationselect");
		var location = locationList.value;
		if (area == "" || location == "") {
			window.android.checkAlert();

		} else {
			var ch1 = document.getElementById("check1");
			var ch2 = document.getElementById("check2");
			var selectedStr;
			if (ch1.checked && !ch2.checked) {
				selectedStr = "1";
			} else if (!ch1.checked && ch2.checked) {
				selectedStr = "2";
			} else if (ch1.checked && ch2.checked) {
				selectedStr = "3";
			} else {
				selectedStr = "0";
			}
			var length = window.android.searchMA100051(area, location,
					selectedStr).size();
			if (length > 0) {
				self.location.href = "MA-1000-5-2.html";
			} else {
				window.android.alertP();
			}
		}

	}
</script>
</head>

<body onload="onLoad()">
	<table width="100%" border="0">
		<tr>
			<td colspan="2"><b>ここから病院を検索できます。</b>
				<hr class="title_divison medical_theme_background_color" />
				<p>
					医療機関の情報は公表データに基づいておりますが、問い合わせの際には、各医療機関にあらためて詳細（診療時間等）をご確認ください。<br />
				</p></td>

		</tr>

		<tr>
			<td colspan="2"><b><font class="subtitle">【地域選択】</font></b><br />
				<a>地域をプルダウンメニューで選択する。</a></td>
		</tr>
		<tr>
			<td colspan="2">
				<table width="100%" border="0">
					<tr>
						<td width="50%"><a>都道府県</a><br /> <select id="areaselect"
							onchange="changed()"></select></td>
						<td width="50%"><a>市区町村</a><br /> <select
							id="locationselect"></select></td>
					</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td colspan="2"><b><font class="subtitle">【診療科選択】</font></b><br />
				<a>診療科をチェックボックスで選択する。</a></td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0">
					<tr>
						<td width="2%" valign="top"><input type="checkbox"
							id="check1" /></td>
						<td><label>精神科</label></td>
					</tr>
					<tr>
						<td valign="top"><input type="checkbox" id="check2" /></td>
						<td><label>心療内科</label></td>
					</tr>

				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				【地域選択】で選んだ「都道府県」「市区町村」の条件から抽出した後に「診療科」のチェックボックスが入っている<br />
				病院を選択する。<br /> <br />
				<div class="tips_border">
					<div class="tips_title">※精神科が選択された場合、精神科、神経科、精神神経科、神経精神科が表示されます。</div>
				</div>
			</td>
		</tr>
		<tr>
			<td><br />
				<table style="font-size: 14px;">
					<tr>
						<td>参照元：</td>
						<td>各都道府県の医療検索サイト</td>
					</tr>
					<tr>
						<td></td>
						<td>（こころの耳）<br />http://kokoro.mhlw.go.jp/
						</td>
					</tr>
				</table> <br /></td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0">
					<tr style="height: 30px;">
						<td align="left">
							<div class="back_button"
								onclick="sendPhaseNoToAzure('MA-1000-5')">&lt;&nbsp;もどる</div>
						</td>
						<td align="right">
							<div class="next_button" onclick="selectbtn()">検索&nbsp;&gt;</div>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>
